﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zocono.WCS.Infrastructure.ApllicationDto.FxModel
{
    #region 获取电芯分档返回模型
    public class Result
    {
        /// <summary>
        /// 返回信息
        /// </summary>
        public string msg { get; set; }
        /// <summary>
        /// 是否处理成功
        /// </summary>
        public bool success { get; set; }
        /// <summary>
        /// 是否NG挑选
        /// </summary>
        public bool IsNgSelect { get; set; }
        /// <summary>
        /// 无用字段
        /// </summary>
        public string res { get; set; }
        /// <summary>
        /// 返回电芯内容
        /// </summary>
        public List<DxInfoResult> dxInfos { get; set; }
    }

    public class DxInfoResult
    {
        /// <summary>
        /// 电芯位置
        /// </summary>
        public int location { get; set; }
        /// <summary>
        /// 电芯代码
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 电芯类型
        /// </summary>
        public short type { get; set; }
        /// <summary>
        /// 分档结果
        /// </summary>
        public byte res { get; set; }
        /// <summary>
        /// 挡位
        /// </summary>
        public string Gear { get; set; }
        /// <summary>
        /// 挡位名称
        /// </summary>
        public string GearName { get; set; }
        /// <summary>
        /// 是否NG
        /// </summary>
        public int IsNg { get; set; }
        /// <summary>
        /// NG说明
        /// </summary>
        public string NgName { get; set; }
    }

    #endregion
    public class PutMesResultDatasInput
    {
        public string ProtocolNO { get; set; }
        public int MsgNO { get; set; }
        public int NeedReply { get; set; }
        /// <summary>
        /// ID
        /// </summary>
        public string CmdID { get; set; }
        /// <summary>
        /// IP
        /// </summary>
        public string EID { get; set; }
        /// <summary>
        /// 数据集合
        /// </summary>
        public List<PutInData> Data { get; set; }
    }

    public class PutInData
    {
        /// <summary>
        /// 设备编码
        /// </summary>
        public string EquipCode { get; set; }
        /// <summary>
        /// 电芯条码
        /// </summary>
        public string CellCode { get; set; }
        /// <summary>
        /// 分选结果
        /// </summary>
        public string Result { get; set; }
        /// <summary>
        /// 分选开始时间
        /// </summary>
        public string StartTime { get; set; }
        /// <summary>
        /// NG原因
        /// </summary>
        public string NGReason { get; set; }
        /// <summary>
        /// 分选托盘条码
        /// </summary>
        public string TrayCode { get; set; }
        /// <summary>
        /// 分选电芯档位
        /// </summary>
        public string GradeName { get; set; }
        /// <summary>
        /// 分选电芯位置
        /// </summary>
        public string Position { get; set; }
        /// <summary>
        /// 响应时间
        /// </summary>
        public DateTime? ResponseTime { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? CollectTime { get; set; }
        /// <summary>
        /// 二维码等级判定结果
        /// </summary>
        public string QRCodeLevel { get; set; }
        /// <summary>
        /// 原码匹配校验结果
        /// </summary>
        public string matchingResult { get; set; }
    }

    public class PutMesResultDatasOutput
    {
        public string ProtocolNO { get; set; }
        public int MsgNO { get; set; }
        public int NeedReply { get; set; }
        /// <summary>
        /// ID
        /// </summary>
        public string CmdID { get; set; }
        /// <summary>
        /// IP
        /// </summary>
        public string EID { get; set; }
        /// <summary>
        /// 数据集合
        /// </summary>
        public List<PutOutData> Data { get; set; }
    }

    public class PutOutData
    {
        /// <summary>
        /// 分选结果状态
        /// </summary>
        public int Ret { get; set; }
        /// <summary>
        /// 分选结果
        /// </summary>
        public string Msg { get; set; }
    }

    public class ReturnContainer
    {
        public List<AutoSelectContainerMsgDto> CellDataDtos { get; set; } = new List<AutoSelectContainerMsgDto>();
    }

    public class AutoSelectContainerMsgDto
    {
        /// <summary>
        /// 电芯条码
        /// </summary>
        public string CellCode { get; set; }

        /// <summary>
        /// 电芯位置
        /// </summary>
        public string CellPosttion { get; set; }

    }

    public class AutoSelectParaIn
    {
        public string EquipmentCode { get; set; }

        public string ContainerBarcode { get; set; }
    }
}
